package com.bluetoothprint;

import android.content.Context;
import android.content.SharedPreferences;
import com.example.ht380d4G_jar_demo.R;

public class Preference {
	private static SharedPreferences getSP(Context context) {
		return context.getSharedPreferences(
				context.getString(R.string.app_name), Context.MODE_PRIVATE);
	}

	public static String getLastDeviceAddress(Context context) {
		return getSP(context).getString("LastDeviceAdd", null);
	}

	public static void setLastDeviceAddress(Context context, String add) {
		getSP(context).edit().putString("LastDeviceAdd", add).commit();
	}
}
